

static void * getFreeList( size_t newSize );
static void * getSizedPayload( size_t newSize );
static int    roundToTwo( size_t size ) ;
static void   removeFromList( void * block );
static void * allocateBlockEnd( size_t size, void * block ) ;
static void * allocateBlockBegin( size_t size, void * block );
static void * coalesceBlock( void * block );
static void   insertFreeBlock( void * block );

static int checkFreeList( void * ls );
static int checkInList ( void * blockPtr ) ;
static int mm_check();

int mm_init(void);
void * mm_malloc(size_t size) ; 
void * mm_calloc(size_t size );
void   mm_free(void *ptr); 
void * mm_realloc(void *ptr, size_t size) ;


/* 
   Dynamic Memory Allocator Implementation: Ben Marks (December 2013)

   This program implements the functionality of a dynamic memory allocator
   and the malloc, calloc, realloc, and free functions. 

   This program uses segregated explicit free lists 

*/
